<div class="clear"></div>
<style type="text/css">
.map{ background:#fff; border:1px solid #eee; padding:5px; }
.map table,tr,td{box-sizing: content-box;}
#allmap {width: 100%;height:500px;overflow: hidden;margin:0;font-family:"微软雅黑"; }
#allmap img{max-width:none;}
</style>
<div class="map">
<div id="allmap"></div>	
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=0AhnqzMOO8ra47GayYcDwiIy"></script>
<script type="text/javascript" src="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
<link rel="stylesheet" href="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
 <script type="text/javascript">
  // 百度地图API功能
  var map = new BMap.Map("allmap");
  var point = new BMap.Point({php} echo config('contact_latlng');{/php});
  map.centerAndZoom(point, 20);
  map.enableScrollWheelZoom();
  map.enableInertialDragging();
  var content = '<div style="padding:8px;line-height:22px;">地址：{:config("contact_address")}<br/>电话：{:config("contact_tel")}</div>'; 
  var searchInfoWindow = null;
  searchInfoWindow = new BMapLib.SearchInfoWindow(map, content, {
		  title  : "{$site.contact_company}",      //标题
		  width  : 290,             //宽度			
		  panel  : "panel",         //检索结果面板
		  enableAutoPan : true,     //自动平移
		  searchTypes   :[
			  BMAPLIB_TAB_SEARCH,   //周边检索
			  BMAPLIB_TAB_TO_HERE,  //到这里去
			  BMAPLIB_TAB_FROM_HERE //从这里出发
		  ]
  });
  var marker = new BMap.Marker(point); 	
  marker.enableDragging(); //marker可拖拽  
  marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
  searchInfoWindow.open(marker);  //默认打开  
  map.addOverlay(marker); //在地图中添加marker    
</script> 